﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<kysec.RAL.EFToMySql.tb_aboutme>>" %>
<%@ Import Namespace="kysec.RAL.EFToMySql" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc"%>
<%string type = Request.QueryString["type"]; if (Model.Count == 0)
   {%><span style="text-align:center; color:Red; font-size:16px;">没有任何信息，请添加信息……</span><a href="<%=kysec.CR.MyUrl.WebData.WEBURL %>/Company/AddInfo?type=<%=type %>" title="点击新增信息" 

style="margin-left:10px;">新增信息</a><%}else{
    %> 
      <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce" onmouseover="changeto()"  onmouseout="changeback()">
  <tr>
    <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">类型</span></div></td>
    <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">内容</span></div></td>
    <td width="12%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">发布时间</span></div></td>
    <td width="5%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10" title="点击转换状态">正在使用</span></div></td>
    <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">当前状态</span></div></td>
    <td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">操作</span></div></td>
  </tr>
    <%
       foreach (kysec.RAL.EFToMySql.tb_aboutme item in Model)
       {%>
  <tr>
    <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">
                                             <%if (type.Equals("0"))
                                               {%>公司介绍<%}
                                               else if (type.Equals("1"))
                                               { %>公司文化<%}
                                               else if (type.Equals("2"))
                                               { %>企业荣誉<%}
                                               else if (type.Equals("3"))
                                               { %>成长历程<%}
                                               else if (type.Equals("4"))
                                               { %>招商代理<%}
                                               else if (type.Equals("5"))
                                               { %>诚聘英才<%}
                                               else if (type.Equals("6"))
                                               { %>服务流程<%}
                                               else if (type.Equals("7"))
                                               { %>联系我们<%}else if (type.Equals("8"))
                                               { %>友情链接<%} %> </span><input type="hidden" id="newId" value="<%=kysec.CR.Common.EncodeByBase64.Encode((item.c_uq_amId).ToString()) %>" /></div></td>
    <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><span class="STYLE19" title="<%=Html.Encode(item.c_ntx_content) %>">内容显示</span></div></td>
    <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"> <%= Html.Encode(item.c_dt_publishDate.ToShortDateString())%></div></td>
    <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><a title="点击转换状态" href="<%=kysec.CR.MyUrl.WebData.WEBURL %>/Company/SetType?id=<%=kysec.CR.Common.EncodeByBase64.Encode((item.c_uq_amId).ToString())%>&type=<%=type %>"><%if(item.c_b_isUsing && !item.c_b_isDelete){%> 正在使用<%}else{%>已停用<%} %></a></div></td>
    <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><%if (bool.Parse(Html.Encode(item.c_b_isDelete).ToString()))
                                                                            {%> 已删除<%}
                                                                            else
                                                                            {%>未删除<%} %></div></td>   
                                                                             
    <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21"><%if (!item.c_b_isDelete)
                                                                            { %><span class="del"><a href="<%:kysec.CR.MyUrl.WebData.WEBURL %>/Company/EditInfo?id=<%:kysec.CR.Common.EncodeByBase64.Encode((item.c_uq_amId).ToString())  %>&type=<%=type %>" target="main">修改</a> &nbsp;|&nbsp;<a href="<%:kysec.CR.MyUrl.WebData.WEBURL  %>/Company/Search?id=<%=kysec.CR.Common.EncodeByBase64.Encode((item.c_uq_amId).ToString())  %>&type=<%=type %>" target="main">查看</a>&nbsp;|&nbsp;<a href="<%=kysec.CR.MyUrl.WebData.WEBURL %>/Company/Delete?id=<%=kysec.CR.Common.EncodeByBase64.Encode((item.c_uq_amId).ToString())%>&type=<%=type %>">删除</a></span><%}
                                                                            else
                                                                            { %><span class="restore"><a href="<%=kysec.CR.MyUrl.WebData.WEBURL %>/Company/Delete?id=<%=kysec.CR.Common.EncodeByBase64.Encode((item.c_uq_amId).ToString())%>&type=<%=type %>" >恢复</a></span><%} %></div></td>
  </tr> 
  <%}%>
</table><%} %>
    <%=Html.AjaxPager(Model, new PagerOptions() { CssClass = "mvcPager", PageIndexParameterName = "id", ShowMorePagerItems = false, AlwaysShowFirstLastPageNumber = true, ShowPageIndexBox = true, PageIndexBoxWrapperFormatString = "页{0}" }, new AjaxOptions() { UpdateTargetId = "page" })%>   



